﻿using System.Threading.Tasks;
using Xc.DataAccess.Core;
using Xc.DataAccess.Protocoals.WaterMeters.Models;
using Xc.DataAccess.Protocoals.WaterMeters.Models.Responds;

namespace Xc.DataAccess.WaterMeters.ClientSides.Services
{
    /// <summary>
    /// 水表设备服务
    /// </summary>
    public interface IWaterDeviceReceiveService
    {
        /// <summary>
        /// 读取表计地址应答
        /// </summary>
        /// <param name="respond"></param>
        /// <param name="frameCommand"></param>
        /// <param name="dataSegment"></param>
        /// <param name="devcieId"></param>
        /// <param name="meterType"></param>
        /// <param name="companyId"></param>
        /// <returns></returns>
        Task<Result> GetMeterAddressRespond(GetMeterAddressRespond respond, FrameCommand frameCommand, DataSegment dataSegment, string devcieId, MeterType meterType, byte companyId);
        /// <summary>
        /// 读取表计数据应答
        /// </summary>
        /// <param name="respond"></param>
        /// <param name="frameCommand"></param>
        /// <param name="dataSegment"></param>
        /// <param name="devcieId"></param>
        /// <param name="meterType"></param>
        /// <param name="companyId"></param>
        /// <returns></returns>
        Task<Result> GetMeterDataRespond(GetMeterDataRespond respond, FrameCommand frameCommand, DataSegment dataSegment, string devcieId, MeterType meterType, byte companyId);
        /// <summary>
        /// 设备主动上传
        /// </summary>
        /// <param name="respond"></param>
        /// <param name="frameCommand"></param>
        /// <param name="dataSegment"></param>
        /// <param name="devcieId"></param>
        /// <param name="meterType"></param>
        /// <param name="companyId"></param>
        /// <returns></returns>
        Task<Result> MeterAutoUploadRespond(MeterAutoUploadRespond respond, FrameCommand frameCommand, DataSegment dataSegment, string devcieId, MeterType meterType, byte companyId);
        /// <summary>
        /// 设置囤积量和报警量应答
        /// </summary>
        /// <param name="respond"></param>
        /// <param name="frameCommand"></param>
        /// <param name="dataSegment"></param>
        /// <param name="devcieId"></param>
        /// <param name="meterType"></param>
        /// <param name="companyId"></param>
        /// <returns></returns>
        Task<Result> SetAlarmVolumeRespond(SetAlarmVolumeRespond respond, FrameCommand frameCommand, DataSegment dataSegment, string devcieId, MeterType meterType, byte companyId);
        /// <summary>
        /// 关阀控制应答
        /// </summary>
        /// <param name="respond"></param>
        /// <param name="frameCommand"></param>
        /// <param name="dataSegment"></param>
        /// <param name="devcieId"></param>
        /// <param name="meterType"></param>
        /// <param name="companyId"></param>
        /// <returns></returns>
        Task<Result> SetCloseValveRespond(SetCloseValveRespond respond, FrameCommand frameCommand, DataSegment dataSegment, string devcieId, MeterType meterType, byte companyId);
        /// <summary>
        /// 设置目标服务器IP地址
        /// </summary>
        /// <param name="respond"></param>
        /// <param name="frameCommand"></param>
        /// <param name="dataSegment"></param>
        /// <param name="devcieId"></param>
        /// <param name="meterType"></param>
        /// <param name="companyId"></param>
        /// <returns></returns>
        Task<Result> SetMeterIpAddressRespond(SetMeterIpAddressRespond respond, FrameCommand frameCommand, DataSegment dataSegment, string devcieId, MeterType meterType, byte companyId);
        /// <summary>
        /// 多次卡充值应答
        /// </summary>
        /// <param name="respond"></param>
        /// <param name="frameCommand"></param>
        /// <param name="dataSegment"></param>
        /// <param name="devcieId"></param>
        /// <param name="meterType"></param>
        /// <param name="companyId"></param>
        /// <returns></returns>
        Task<Result> SetMeterMutipleChargeRespond(SetMeterMutipleChargeRespond respond, FrameCommand frameCommand, DataSegment dataSegment, string devcieId, MeterType meterType, byte companyId);
        /// <summary>
        /// 修改上报周期和超时限制
        /// </summary>
        /// <param name="respond"></param>
        /// <param name="frameCommand"></param>
        /// <param name="dataSegment"></param>
        /// <param name="devcieId"></param>
        /// <param name="meterType"></param>
        /// <param name="companyId"></param>
        /// <returns></returns>
        Task<Result> SetMeterUploadIntervalRespond(SetMeterUploadIntervalRespond respond, FrameCommand frameCommand, DataSegment dataSegment, string devcieId, MeterType meterType, byte companyId);
        /// <summary>
        /// 设置表计底数
        /// </summary>
        /// <param name="respond"></param>
        /// <param name="frameCommand"></param>
        /// <param name="dataSegment"></param>
        /// <param name="devcieId"></param>
        /// <param name="meterType"></param>
        /// <param name="companyId"></param>
        /// <returns></returns>
        Task<Result> SetMeterValueRespond(SetMeterValueRespond respond, FrameCommand frameCommand, DataSegment dataSegment, string devcieId, MeterType meterType, byte companyId);
        /// <summary>
        /// 开阀控制应答
        /// </summary>
        /// <param name="respond"></param>
        /// <param name="frameCommand"></param>
        /// <param name="dataSegment"></param>
        /// <param name="devcieId"></param>
        /// <param name="meterType"></param>
        /// <param name="companyId"></param>
        /// <returns></returns>
        Task<Result> SetOpenValveRespond(SetOpenValveRespond respond, FrameCommand frameCommand, DataSegment dataSegment, string devcieId, MeterType meterType, byte companyId);
        /// <summary>
        /// 恢复出厂设置表计应答
        /// </summary>
        /// <param name="respond"></param>
        /// <param name="frameCommand"></param>
        /// <param name="dataSegment"></param>
        /// <param name="devcieId"></param>
        /// <param name="meterType"></param>
        /// <param name="companyId"></param>
        /// <returns></returns>
        Task<Result> SetRestoreFactoryRespond(SetRestoreFactoryRespond respond, FrameCommand frameCommand, DataSegment dataSegment, string devcieId, MeterType meterType, byte companyId);
        /// <summary>
        /// 用户充值应答
        /// </summary>
        /// <param name="respond"></param>
        /// <param name="frameCommand"></param>
        /// <param name="dataSegment"></param>
        /// <param name="devcieId"></param>
        /// <param name="meterType"></param>
        /// <param name="companyId"></param>
        /// <returns></returns>
        Task<Result> SetUserChangeRespond(SetUserChangeRespond respond, FrameCommand frameCommand, DataSegment dataSegment, string devcieId, MeterType meterType, byte companyId);
    }
}
